package generator.template;

public class SelectGenerator {

	public static String generate(String path, String type, String condition, int selectCounter) {
		return "\n\t\tprivate function select"+type+""+selectCounter+"(colecao:Vector.<"+type+">):Vector.<"+type+">{\n"+
				"\t\t\tvar novo:Vector.<"+type+"> = new Vector.<"+type+">();\n"+
				"\t\t\tfor each (var value:"+type+" in colecao){\n"+
				"\t\t\t\tif(value."+condition+"){\n"+
				"\t\t\t\t\tnovo.push(value);\n"+
				"\t\t\t\t}\n"+
				"\t\t\t}\n"+
				"\t\t\treturn novo;\n"+
				"\t\t}\n";
	}

}
